let f7 = null;
let picker = null;

class Picker {
  static init(app) {
    f7 = app;
  }

  static show(param, animate = true) {
    Picker.dismiss();
    // picker = f7.picker.create(param).open(animate);
    picker = f7.picker.create(param);
    return picker;
  }

  static dismiss(animate = true) {
    let result = false;

    if (null != picker && picker.opened) {
      // picker.close(animate).destroy()
      picker.close(animate)
      picker = null;
      result = true;
    }

    return result;
  }
}

export default Picker;